#ifndef TEXTURE_H
#define	TEXTURE_H

#include "resource.h"

//! Klasa enkapsuluje teksture opengl'a
class Texture : public Resource
{
 friend class TextureManager;
 friend class DynamicTexture;

 typedef unsigned int uint;

 private:

	uint id;
	int width;
	int height;
	int colorType;
	int texType;
	bool areMipmaps;

	//Na ten moment jest to raczej wewnetrzna klasa TextureManagera, nie pozwalamy wiec tworzyc jej obiektow przez usera
	Texture() : id(0), width(-1), height(-1), colorType(-1), texType(-1), areMipmaps(0)
	{ }

	Texture( uint id_, int width_, int height_, int colorType_, int texType_, bool areMipmaps_ ) : id(id_), width(width_), height(height_), colorType(colorType_), texType(texType_), areMipmaps(areMipmaps_) 
	{  }

 public:
	
	uint GetId() const
	{ return id; }

	int GetWidth() const
	{ return width; }

	int GetHeight() const
	{ return height; }

	//! To samo co GetInternalFormat
	int GetColorType() const
	{ return colorType; }

	//! To samo co GetColorType
	int GetInternalFormat() const
	{ return colorType; }

	int GetTexType() const
	{ return texType; }

	//! True jesli dla tekstury zostaly wygenerowane mipmapy, false w przeciwnym przypadku
	bool AreMipmaps() const
	{ return areMipmaps; }

};

#endif